import Vue from 'vue'
import Router from 'vue-router'

import Layout from '@/views/layout/layout'

Vue.use(Router)

export const constantRouterMap = [
  {
    path: '/login',
    name: 'login-page',
    component: require('@/views/login/index').default
  },
  {
    path: '/main',
    name: 'main-page',
    component: require('@/views/pages/MainPage').default
  },
  {
    path: '/',
    component: Layout
  },
  {
    path: '*',
    redirect: '/'
  }
]

export default new Router({
  routes: constantRouterMap
})
